#ifndef PRINT_H
#define PRINT_H


/* Includes ------------------------------------------------------------------*/
#include "stm32f10x.h"
#include <stdio.h>
#include <string.h>

/* Exported types ------------------------------------------------------------*/
/* Exported constants --------------------------------------------------------*/
#define PRINT_UART				USART1
#define PRINT_UART_CLK			RCC_APB2Periph_USART1
#define PRINT_UART_CLK_INIT		RCC_APB2PeriphClockCmd
#define PRINT_UART_IRQn			USART1_IRQn
#define PRINT_UART_IRQHandler	USART1_IRQHandler

#define PRINT_TX_PIN			GPIO_Pin_9
#define PRINT_TX_PORT			GPIOA
#define PRINT_TX_CLK			RCC_APB2Periph_GPIOA

#define PRINT_RX_PIN			GPIO_Pin_10
#define PRINT_RX_PORT			GPIOA
#define PRINT_RX_CLK			RCC_APB2Periph_GPIOA



/* Exported macro ------------------------------------------------------------*/
#define DEBUG 
#if defined(DEBUG)
	#define LOG(format, args...) 	printf(format, ##args)
	//#define LOG(format, ...)  	printf(format, ##__VA_ARGS__)
#else
	#define LOG(format, args...)
#endif


/* Exported variables ---------------------------------------------------------*/
/* Exported functions ------------------------------------------------------- */

void print_init(void);

#endif

